package Pantallas;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import Clases.*;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class porCedula extends javax.swing.JDialog {
	private JList lista;
	Seccion sec;
	private JButton jButton2;
	private JLabel jLabel1;

	/**
	* Auto-generated main method to display this JDialog
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				JFrame frame = new JFrame();
				porCedula inst = new porCedula(frame);
				inst.setVisible(true);
			}
		});
	}
	
	public porCedula(JFrame frame) {
		super(frame);
		initGUI();
	}
	public porCedula(JFrame frame,Seccion sec) {
		super(frame);
		initGUI();
		this.sec=sec;
	}
	
	private void initGUI() {
		try {
			{
				getContentPane().setLayout(null);
				this.addWindowListener(new WindowAdapter() {
					public void windowOpened(WindowEvent evt) {
						System.out.println("this.windowOpened, event="+evt);
						//TODO add your code for this.windowOpened
						sec.ListaEstuCedula(lista);
					}
					public void windowClosed(WindowEvent evt) {
						System.out.println("this.windowClosed, event="+evt);
						//TODO add your code for this.windowClosed
					}
				});
				{
					ListModel listaModel = 
						new DefaultComboBoxModel(
								new String[] { "Item One", "Item Two" });
					lista = new JList();
					getContentPane().add(lista);
					lista.setModel(listaModel);
					lista.setBounds(44, 51, 288, 138);
					lista.setFont(new java.awt.Font("Dialog",0,10));
				}
				{
					jLabel1 = new JLabel();
					getContentPane().add(jLabel1);
					jLabel1.setText("Estudiantes ordenados por Cedula");
					jLabel1.setFont(new java.awt.Font("Dialog",1,14));
					jLabel1.setBounds(44, 17, 288, 22);
				}
				{
					jButton2 = new JButton();
					getContentPane().add(jButton2);
					jButton2.setText("Salir");
					jButton2.setBounds(146, 201, 91, 22);
					jButton2.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/action_stop.gif")));
					jButton2.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out.println("jButton2.actionPerformed, event="+evt);
							//TODO add your code for jButton2.actionPerformed
							dispose();
							
						}
					});
				}
			}
			this.setSize(396, 271);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
